<?php
namespace appin;

use app\BaseController as Base;

class BaseController extends Base
{
    /**
     * 模板渲染
     * @param string $template
     * @param array $data
     * @return \think\response\View
     */
    public function render($template = '', $data = [])
    {
        $appin = app()->appin;
        empty($template) && $template = $appin['name'].'/template/'
            .str_replace('.','/', strtolower($appin['controller'])).'/'
            .$appin['action'];
        return view($template, $data);
    }
}